{
    title:  'Debugging a Build',
    crumbs: [
        { "User's Guide": 'index.html' },
    ],
}
        <h1>Debugging a Build</h1>
        <p>MakeMe provides several switches that help you to see what MakeMe is doing and why. While MakeMe 
        will automatically calculate many of the complex dependencies in a project, you may find situations when a 
        target is not being build when you expected it to. Conversely a target may be built when you did not 
        expect it to be. Why? 
        
        <a id="why"></a>
        <h2>Why Targets are Building</h2>
        <p>With Make and other build tools, it is often difficult to determine why a target is or is not being built. MakeMe provides a <em>--why</em> command line switch to diagnose problematic build sequences. This switch displays the reason why each target was or was not built. For example:</p>
     
        <pre class="ui code segment">$ me <b>--why</b> libmpr
    [Target] macosx-x64-release/inc/mpr.h is up to date
    [Target] macosx-x64-release/inc/me.h is up to date
    [Target] macosx-x64-release/inc/bitos.h is up to date
   [Rebuild] macosx-x64-release/obj/mprLib.o because input src/deps/mpr/mprLib.c has been modified.
   [Compile] src/deps/mpr/mprLib.c
   [Rebuild] macosx-x64-release/bin/libmpr.dylib because input \
             macosx-x64-release/obj/mprLib.o has been modified.
      [Link] libmpr
</pre>
        <a id="show"></a>
        <h2>Showing Executed Commands</h2>
        <p>MakeMe shows as little output as possible while building so you can easily see build errors such as compiler
        warnings and errors. With other build systems, these are often lost in a swamp of trace.</p>
        <p>However, sometimes youneed to see the exact command that MakeMe is issuing to build a target. 
        To see the actual commands MakeMe is executing to compile sources and
        link libraries, run "me" with the <em>--show</em> switch (this can be abbreviated to -s).
<pre class="ui code segment">$ me <b>-s</b>
   [Compile] src/deps/mpr/mprSsl.c
       [Run] /usr/bin/clang -c -o macosx-x64-release/obj/mprSsl.o -arch x86_64 \
             -Wall -Wno-deprecated-declarations -O3 -Wno-unused-result \
             -Wshorten-64-to-32 -Imacosx-x64-release/inc \
             src/deps/mpr/mprSsl.c
      [Link] libmprssl
</pre>
        <a id="dump"></a>
        <h2>Dumping the Project</h2>
        <p>In a complex project containing many MakeMe files, it can be helpful to see the entire aggregated MakeMe 
        configuration in one file. Use the <em>--dump</em> switch to save a copy of the entire configuration. In the dump, 
        build defaults are fully expanded to each target contains the expanded configuration that will be used to build
        the target. The dump will be saved to an OS-ARCH-PROFILE.dmp.</p>
        <pre class="ui code segment">$ me <b>--dump</b></pre>
            
        <a id="useful"></a>
        <h2>Other Useful Bits</h2>
        <p>To build totally quietly, use the <em>--quiet</em>
            switch. To continue building despite build errors, use the <em>--continue</em> switch.</p>
        <p>To learn more, read about <a href="make.html">Using Generated Makefiles</a>.</p>
